# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-patsy
pkgver=0.5.6
pkgrel=2
pkgdesc="Describing statistical models in Python using symbolic formulas"
url="https://github.com/pydata/patsy"
arch="noarch"
license="BSD-2-Clause"
depends="
	python3
	py3-numpy
	py3-scipy
	py3-six
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-xdist py3-pytest-cov"
subpackages="$pkgname-pyc"
source="https://github.com/pydata/patsy/archive/v$pkgver/patsy-$pkgver.tar.gz
	numpy2-array.patch
	"
builddir="$srcdir/patsy-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
6e707dcf7701a640312e2674742fec8fa5ba8754f43323f16336959e7ae4ea2f94ae7d5400e0efedc8a616e5e02555c48d5d82e4b6adc32fd21f382928275d6f  patsy-0.5.6.tar.gz
cc398187b4f0b6887bb4d20150354032c5e183dbab45b84efd1ce81fb9e9f2e18e27545dd163c9f06f81603d14fd2b46e2f858c40cb798d3c7c38e7cafdcb43f  numpy2-array.patch
"
